package com.frain.springcloud.hystrix.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.frain.springcloud.hystrix.original.HystrixOriginalCommand;

/**
 * 
 * @ClassName: HystrixOriginalController 
 * @Description: 使用hystrix  原生的方式使用spring cloud
 * @author frain
 * @date 2018年8月6日 下午1:44:06 
 *
 */
@RestController
@RequestMapping("/hystrix/original")
public class HystrixOriginalController {

    @RequestMapping("/time/three/finish")
    public String timeThreeFinish() {

        System.out.println("hystrix  original  execution...");

        String path = "http://localhost:10020/demo/timeThreeFinish";
        return new HystrixOriginalCommand(path).execute();

    }

}
